<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>充值</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="__PUBLIC__/admin/favicon.ico">
    <link href="__PUBLIC__/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/admin/js/spectrum/spectrum.css">
    <link href="__PUBLIC__/admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/animate.css" rel="stylesheet">
    <link href="__PUBLIC__/admin/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/admin/js/plugins/fancybox/jquery.fancybox.css" rel="stylesheet">
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>信用查-<small>账户充值</small><small></small></h5>
                </div>

                <div class="ibox-content">
                    <form method="post" class="form-horizontal" onsubmit="return false"  target="_blank">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">充值账号</label>
                            <div class="col-sm-10">
                                <input type="text"  class="form-control" id="shop_identifier" name="shop_identifier" value="<{$data.shop_identifier}>" disabled >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">订单号</label>
                            <div class="col-sm-10">
                                <input type="text"  class="form-control" id="order_num" name="order_num" value="<{$data.order_num}>" disabled >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">充值金额(元)</label>
                            <div class="col-sm-10">
                                <input type="number"  class="form-control" id="money" name="money" value="<{$data.money}>" disabled >
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-primary" type="button" onclick="save()">立即充值</button>
                                <button class="btn btn-white" type="button" onclick="javascript :history.back(-1);">返回</button>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
</div>
<script src="__PUBLIC__/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/admin/js/layer/layer.js"></script>
<script src="__PUBLIC__/admin/js/layui/layui.js"></script>
<script src="__PUBLIC__/admin/js/content.js?v=1.0.0"></script>
<script>
    var url="__MODULE__/Finance/aliPayPage";
    //提交
    var op=1;
    var picop=1;
    function save() {
        var order_num =$("#order_num").val();

        if(order_num.substr(0,3)=='WCZ'){//代扣充值

            window.location.href='__MODULE__/Finance/jd_qr?order_num='+order_num;
             return false;
        }


        var index = layer.load(1, {
            shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
        if(op==1) {

            op=1
            $.post(url,{order_num:order_num,},
                function (data) {
                    layer.closeAll();
                    console.log('pppppp',data);
                    if(data.code=='1001'){
                        document.write(data.result);
                    }else{
                        if(data.status=='0'){
                            layer.msg(data.info,{time:2000,icon:5});
                        }else{
                            layer.msg(data.result,{time:2000,icon:5});
                        }
                    }
                }, 'json');
        }
    }

</script>




</body>
</html>
